<?php

class VideoRegion extends CActiveRecord {
    public function rules() {
        return array(
            array('video_id,region_name', 'required'),
            array('region_name', 'length', 'max' => 30)
        );
    }

    /**
     * Returns the static model of the specified AR class.
     * @return CActiveRecord the static model class
     */
    public static function model($className=__CLASS__) {
        return parent::model($className);
    }

    /**
     * @return string the associated database table name
     */
    public function tableName() {
        return '{{video_region}}';
    }

    public function attributeLabels() {
        return array(
            'file_path' => Yii::t('default', '文件路径'),
            'file_name' => Yii::t('default', '文件名称'),
            'file_sort' => Yii::t('default', '显示顺序'),
            'server_id' => Yii::t('default', '所在服务器'),
            'video_id' => Yii::t('default', '所属视频'),
            'file_play_mode' => Yii::t('default', '是否免费'),
            'file_mode' => Yii::t('default', '模式'),
        );
    }

}